An analog/digital conversion is a process for converting an analog signal to a digital signal. Currently the pulse code modulation (PCM) technology developed by the Bell Laboratory in 1939 is widely applied in the analog/digital conversion. The PCM conversion has three major steps including sampling, quantization and encoding.
A sampling cycle in seconds is denoted as T. Inverse of the sampling cycle, which is the number of sampling cycles per second, is called sampling frequency denoted as fs in hertz (Hz). Once the sampling frequency is higher, audio quality gets better. Generally, when the sampling frequency is 8000 Hz, the audio quality is quite satisfactory. To obtain a CD-quality, the sampling frequency is 44100 Hz.
A sampled pulse signal at the sampling time point should be an amplitude equal to an original amplitude. The amplitude can be any possible value. The amplitude is quantized into a digital level signal. The quantization process obtains an approximation of a sampled signal. Each approximation result is called quantization level, and intervals between the quantization levels are determined according to a code length. Since the code length is expressed in bits to represent an audio data, a resolution of the amplitude is determined by the code length. When the code length is one byte, the resolution is 255. When the code length is two bytes, the resolution reaches 65535 so that the audio quality becomes much better. However, a good digital signal processor (DSP) and more memory space is required to store the voice data represented in a larger code length.
A differential pulse-code modulation (DPCM) is introduced to reduce data amount. The DPCM records a difference between a current value and a previous value. Therefore, compared to PCM, the data amount produced by the DPCM is in average reduced to 25% of the original data amount. An adaptive differential pulse-code modulation (ADPCM) is a variation of the DPCM. The ADPCM implements a scale factor to compress the data amount, so as to increase transmission bandwidth. The ADPCM is described in the ITU-T standard G.726 in detail.
During a cross-platform encoding and decoding process, a mismatch between a code length and a decoding capability occurs. That is, when the code length used at an encoder end is not supported at a decoder end, a problem is incurred. For example, referring to FIG. 1, a digital television (DTV) 1 is connected to a Universal Serial Bus (USB) disk 11 via a USB connector 10 to further access and play multimedia files 110 stored in the USB disk 11. An audio compression data such as an MP3 data in the ISO-MPEG Audio Layer-3 format has a code length of 32 bits. When a decoder 12 of the DTV 1 supports only 24 bits, quantization values generated from an inverse quantization in the frequency domain over-flow or saturate, such that a PCM signal in the time domain is distorted and audio quality is deteriorated. Therefore, one main object of the present invention is to overcome the disadvantage as mentioned above.